// import { del } from "vue";
import { post,get ,del} from "../util/request";
//添加购物车
export const addtocart = (data) => {
  return post("/api/v1/shop_carts", data);
};


//获取购物车数据
export const reqCartlist=()=>get('/api/v1/shop_carts')

//根据id删除单个购物车信息
export const reqDeleteCart=(id)=>del("/api/v1/shop_carts/"+id)

// 批量删除购物车

export const reqDeleteCarts=(ids)=>post("/api/v1/shop_carts/delmany",{ids})//ids:ids